package com.spzx.order.api.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.spzx.common.core.web.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单
 * </p>
 *
 * @author biu
 * @since 2025-03-18
 */
@Getter
@Setter
@TableName("order_info")
@ApiModel(value = "OrderInfo对象", description = "订单")
public class OrderInfo extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("会员_id")
    private Long userId;

    @ApiModelProperty("昵称")
    private String nickName;

    @ApiModelProperty("订单号")
    private String orderNo;

    @ApiModelProperty("使用的优惠券")
    private Long couponId;

    @ApiModelProperty("订单总额")
    private BigDecimal totalAmount;

    @ApiModelProperty("优惠券")
    private BigDecimal couponAmount;

    @ApiModelProperty("原价金额")
    private BigDecimal originalTotalAmount;

    @ApiModelProperty("运费")
    private BigDecimal feightFee;

    @ApiModelProperty("订单状态【0->待付款；1->待发货；2->已发货；3->待用户收货，已完成；-1->已取消】")
    private Integer orderStatus;

    @ApiModelProperty("收货人姓名")
    private String receiverName;

    @ApiModelProperty("收货人电话")
    private String receiverPhone;

    @ApiModelProperty("收货人地址标签")
    private String receiverTagName;

    @ApiModelProperty("省份/直辖市")
    private String receiverProvince;

    @ApiModelProperty("城市")
    private String receiverCity;

    @ApiModelProperty("区")
    private String receiverDistrict;

    @ApiModelProperty("详细地址")
    private String receiverAddress;

    @ApiModelProperty("支付时间")
    private Date paymentTime;

    @ApiModelProperty("发货时间")
    private Date deliveryTime;

    @ApiModelProperty("确认收货时间")
    private Date receiveTime;

    @ApiModelProperty("取消订单时间")
    private Date cancelTime;

    @ApiModelProperty("取消订单原因")
    private String cancelReason;



    @ApiModelProperty("订单明细")
    @TableField(exist = false)
    private List<OrderItem> orderItemList;
}
